package com.meeruu.sg.account.core.api.exception;

import lombok.Data;

/**
 * @Auther: liwu
 * @Date: 2019/5/14 14:52
 * @Description:
 */
@Data
public class AccountException extends RuntimeException{


    private int code;
    private String message;

    public AccountException(int code,String message){
        super(message);
        this.code = code;
        this.message = message;
    }

    public AccountException(ErrorCode errorCode){
        this.code = errorCode.getCode();
        this.message = errorCode.getMessage();
    }

    public AccountException(Throwable cause) {
        super(cause);
    }

    public AccountException(String message) {
        super(message);
        this.message = message;
    }

}
